<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>

    // 展开数组和对象
    // var list = [1, 4, 2, 8, 3, 9];

    // console.log(...list);
    // var arr = [...list];




    // Rest参数  将剩余参数整合到数组中
    function fn(a, b, ...list) {
        // a = 1
        // b = 2;
        // ...list = 4, 5, 6, 7, 8, 9  推出 list = [4, 5, 6, 7, 8, 9]

    }

    fn(1, 2, 3, 4, 5, 6, 7, 8, 9);



</script>

</html>